﻿<%@ Page Title="" Language="C#" MasterPageFile="/Common/Master.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForm" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHtml" runat="Server">
    <style type="text/css">
        /*头条*/
        #toolbarSearchtext { width: 100%; }
        #toolbarSearchtext ul { overflow: hidden; padding: 0px; margin: 6px 0 0 0; }
        #toolbarSearchtext ul li { float: left; width: 240px; margin-bottom: 10px; overflow: hidden; }
        /*左侧文字*/
        #toolbarSearchtext ul li .left_tit { width: 60px; text-align: right; display: inline-block; font-size: 12px; }
        /*全部input 宽度*/
        #toolbarSearchtext ul li .my_input { width: 160px; line-height: 30px; height: 30px; }
        /*日期框样式*/
        #toolbarSearchtext ul li input.date { width: 160px; border-radius: 5px; border: 1px solid #dfdfdf; height: 25px; line-height: 25px; border: 1px solid #95b8e7; }
        /*小型li样式*/
        /*   #toolbarSearchtext ul.wid225 li { width: 225px; }
        #toolbarSearchtext ul.wid225 li > span.left_tit { width: 55px; }
        #toolbarSearchtext ul.wid225 li > span.four { width: 60px; }*/
        /*查询框*/
        #toolbarSearchtext ul li.search { width: 60px; }
        .easyui-textbox { height: 30px; }
    </style>
    <div id="toolBar" style="display: none;">
        <%--<div id="toolbarSearch" style="display: none;" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Search(obj)">搜索</div>--%>
        <div id="toolbarAdd" style="display: none;" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Insert(obj)">添加</div>
        <div id="toolbarEdit" style="display: none;" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Update(obj)">修改</div>
        <div id="toolbarDelete" style="display: none;" data-options="iconCls:'icon-table_delete',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Delete(obj)">删除</div>
        <%--<div id="toolbarSearchtext"></div>--%>
        <div id="toolbarSearchtext">
            <%--<ul>
                <li>
                    <span class="left_tit">部门ID：</span>
                    <input id="search_ID" class="easyui-textbox my_input" />
                </li>
                <li>
                    <span class="left_tit">部门名称：</span>
                    <input id="search_name" class="easyui-textbox my_input" />
                </li>
                <li class="search">
                    <div id="toolbarSearch" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="Search()">查询</div>
                </li>
            </ul>--%>
        </div>
    </div>
    <div id="page"></div>
    <table id="dg1" style="display: none;">
        <thead>
            <tr>
                <th data-options="field: 'ID'">主键ID</th>
                <th data-options="field: 'dept_id'">部门ID</th>
                <th data-options="field: 'name',width: 250">部门名称</th>
                <th data-options="field: 'parent_id',width: 150">父级部门ID</th>
                <th data-options="field: 'source_identifier',width: 150">部门唯一标识</th>
                <th data-options="field: 'parent_order',width: 150">排序</th>
                <th data-options="field: 'AddUserID',width: 150">创建人</th>
                <th data-options="field: 'AddTime',width: 150">创建时间</th>
                <th data-options="field: 'OrgID',width: 150">orgid</th>
            </tr>
        </thead>
    </table>

    <script type="text/javascript">
        var obj;
        $(function () {
            obj = {
                id: "dg1",
                key: "ID",
                url: "Api/V1/dd_dep/GetPagesdep",
                deleteUrl: "Api/V1/dd_dep/Deletedep",
                data: { /*ID: "ec871d25-9b6b-4c47-9c55-dafa080d77dd"*/ },

                //title: "钉钉部门管理",
                dialogName: "钉钉部门管理",
                dialogWidth: Cookies.get('DialogWidth') + "px",
                dialogHeight: Cookies.get('DialogHeight') + "px",
                editUrl: "/DingDing/dd_dep/edit.aspx",
                detailsUrl: "/DingDing/dd_dep/details.aspx",
                toolBar: '#toolBar',
                footer: '#page',
                callback: function () { $.fn.DataGrid.onRefresh(obj); }
            };
            $.fn.DataGrid.DataBind(obj);
            demo();
        });

        function demo() {
            var str = "<ul>";

            str += '<li><span class="left_tit">部门ID：</span><input id="search_ID" class="easyui-textbox my_input" /></li>';
            str += '<li><span class="left_tit">部门名称：</span><input id="search_name" class="easyui-textbox my_input" /></li>';
            str += "<li class=\"search\"><div id=\"toolbarSearch\" data-options=\"iconCls:'icon-table_edit',plain:'true'\" class='easyui-linkbutton' onclick='Search()'>查询</div></li>";

            str += "</ul>";

            $("#toolbarSearchtext").html(str);
        }

        function Search() {
            obj.data.ID = $.GetValue("search_ID");
            obj.data.name = $.GetValue("search_name");
            $.fn.DataGrid.onRefresh(obj);
        }
    </script>
    <script src="/plugin/easyui/jquery.easyui.min.js"></script>
</asp:Content>

